using System;
using System.Data;

namespace MirLda.BL.DB.Fields
{
	/// <summary>
	/// Fields for news item
	/// </summary>
	internal sealed class NewsItemDBFields
	{
		#region constructor
		private NewsItemDBFields(){}
		#endregion

		#region fields

		internal const string Id		= "NewsItemId";
		internal const string Title		= "NewsItemTitle";
		internal const string Annonce	= "NewsItemAnnonce";
		internal const string Content	= "NewsItemContent";

		#endregion

		#region methods

		internal static int GetNewsItemId( IDataReader dr )
		{
			return Int32.Parse( dr[ Id ].ToString() );
		}

		internal static string GetNewsItemTitle( IDataReader dr )
		{
			return dr[ Title ].ToString() ;
		}

		internal static string GetNewsItemAnnonce( IDataReader dr )
		{
			return dr[ Annonce ].ToString() ;
		}

		internal static string GetNewsItemContent( IDataReader dr )
		{
			return dr[ Content ].ToString();
		}

		#endregion
	}
}
